return "Modified Button Object for the down arrow on a scrollbar"
end
on beginSprite me
me.upmember = the member of sprite me.spriteNum
case sprite(me.scrollBar).boundsRect of
"Fixed":
viewingTop = the top of sprite sprite(me.scrollBar).uparrow
viewingBottom = the bottom of sprite sprite(me.scrollBar).dnarrow
"Stage":
viewingTop = 0
viewingBottom = the stageBottom - the stageTop
"Custom":
viewingTop = the top of sprite sprite(me.scrollBar).box
viewingBottom = the bottom of sprite sprite(me.scrollBar).box
end case
end
on mouseDown me
set the member of sprite the spriteNum of me to member(me.downmember)
thePercent = 0
repeat while the stillDown
if (the locV of sprite me.thumb + me.ScrollSpeed) <= (the bottom of sprite me.scrollBar - (member(the memberNum of sprite sprite(me.thumb).spriteNum).height / 2)) then
set the locV of sprite the thumb of me to the locV of sprite me.thumb + me.ScrollSpeed
v = the locV of sprite me.thumb
H = member(the memberNum of sprite sprite(me.thumb).spriteNum).height / 2
realT = the top of sprite me.thumb
t = the top of sprite me.scrollBar + H
b = the bottom of sprite me.scrollBar - H
H2 = member(the memberNum of sprite sprite(me.scrollBar).spriteNum).height - member(the memberNum of sprite sprite(me.thumb).spriteNum).height
targetOffset = member(the memberNum of sprite sprite(me.target).spriteNum).height / 2